import { IsString, Length } from 'class-validator'

export class AuthLoginDTO {
  @IsString({ message: '参数错误' })
  mobile: string
  @Length(6, 12)
  @IsString({ message: '参数错误' })
  password: string
}

export class AuthRegisterDTO extends AuthLoginDTO {
  @IsString({ message: '参数错误' })
  name: string
  @Length(4)
  @IsString({ message: '参数错误' })
  code: string
}
